<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" href="css/common.css" type="text/css" />
        <link href="css/adminstyle.css" rel="stylesheet" type="text/css">
        <script src="js/jquery-1.6.2.min.js">
        </script>
        <title>
            管理区域
        </title>
    </head>
    
    <body>
        <div id="man_zone">
         <div style="background-color:#FFFFFF ">
         <div class="dataTada_U1">
       	   <div class="a1"><a href="?m=<?=$upTime?>"><<</a> <?=$y?>年<?=$m?>月 <a href="?m=<?=$nextTime?>">>></a></div>
         	<ul class="dataTable"><?=$calendar?></ul>
         </div>
         <div>		
                <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder" style="margin-top:8px;">
                    <tr class="header">
                        <td colspan="8">
                            &nbsp;Shift Record
                        </td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                        <td colspan="4" align="left">
                            <? if($_SESSION[ 'admin'][ 'admin_type']==ADMIN_TYPE_EMPLOYEE){ ?>
                                <input name="" type="button" class="PublicBot" value="Back" onclick="javaScript:location.href='teacher_lists.html'"
                                />
                                <?} ?>
                        </td>
                      <td colspan="4" align="right">&nbsp;</td>
                    </tr>
                    <tr bgcolor="#FFFFFF">
                        <td align="center">
                            Time</td>
                        <? foreach($date as $v){ ?>
                            <td align="center">
                                <?=date( 'Y-m-d',$v)?>
                            </td>
                            <? } ?>
                    </tr>
                    <? foreach ($time as $v){?>
                        <tr bgcolor="#FFFFFF">
                            <td align="center">
                                <?=$v[ 'name']?>
                            </td>
                            <? foreach($date as $v1){ ?>
                                <td align="center">
                                   <? 
									$book=0 ;
									$status_name = Common::_t('teacher_openclass_status');
									$confirm_status_name = Common::_t('teacher_confirmclass_status');
									if (isset($courseTimeData[$v1][$v['time']])) {
										$status  = $courseTimeData[$v1][$v[ 'time']]['status'];
										$confirm_status = $courseTimeData[$v1][$v['time']]['confirm_status'];
									   if ($status==TEACHER_CLASS_STATUS_NOTBOOKING&&$confirm_status==TEACHER_STATUS_UNCONFIRMED){ echo "<font color=\"black\">".$confirm_status_name[TEACHER_STATUS_UNCONFIRMED]."</font>";};
									   if ($status==TEACHER_CLASS_STATUS_NOTBOOKING&&$confirm_status==TEACHER_STATUS_CONFIRMED){ echo "<font color=\"black\">".$status_name[TEACHER_CLASS_STATUS_NOTBOOKING]."</font>";};
				                       if($status==TEACHER_CLASS_STATUS_BOOKING){ echo "<font color=\"blue\">".$status_name[TEACHER_CLASS_STATUS_BOOKING]."</font>";}
				                       if($status==TEACHER_CLASS_STATUS_CLASSED){ echo "<font color=\"green\">".$status_name[TEACHER_CLASS_STATUS_CLASSED]."</font>";} 
									}
									else{
										echo '-';
									}
									?>
                                </td>
                                <? } ?>
                        </tr>
                        <? } ?>
                </table>
                </div>
            </div>
        </div>
    </body>
</html>